Class org.omg.CORBA.TypeCode
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.omg.CORBA.TypeCode

java.lang.Object
   |
   +----org.omg.CORBA.TypeCode

public class TypeCode
extends Object

Constructor Index

 o TypeCode()

Method Index

 o content_type()
The content_type operation can be invoked on sequence, array, and alias TypeCodes.
 o default_index()
The default_index operation can only be invoked on union TypeCodes.
 o discriminator_type()
The discriminator_type operation can only be invoked on union TypeCodes.
 o equal(TypeCode)
The equal operation can be invoked on any TypeCode.
 o id()
The id operation can be invoked on object reference, structure, union, enumeration, alias, and exception TypeCodes.
 o kind()
The kind operation can be invoked on any TypeCode.
 o length()
The length operation can be invoked on string, sequence, and array TypeCodes.
 o member_count()
The member_count operation can be invoked on structure, union, and enumeration TypeCodes.
 o member_label(int)
The member_label operation can only be invoked on union TypeCodes.
 o member_name(int)
The member_name operation can be invoked on structure, union, and enumeration TypeCodes.
 o member_type(int)
The member_type operation can be invoked on structure and union TypeCodes.
 o name()
The name operation can also be invoked on object reference, structure, union, enumeration, alias, and exception TypeCodes.

Constructors

 o TypeCode
  public TypeCode()

Methods

 o equal
  public abstract boolean equal(TypeCode tc) throws SystemException
The equal operation can be invoked on any TypeCode. Equal TypeCodes are interchangeable, and give identical results when TypeCode operations are applied to them.
Parameters:
tc - the TypeCode to compare against.
Returns:
true if the typecodes are indeed equal, false otherwise.
 o kind
  public abstract int kind() throws SystemException
The kind operation can be invoked on any TypeCode.
Returns:
an integer indicating the kind of the TypeCode. This also determines what other operations can be invoked on the TypeCode.
 o id
  public abstract String id() throws BadKind, SystemException
The id operation can be invoked on object reference, structure, union, enumeration, alias, and exception TypeCodes. It returns the RepositoryId globally identifying the type. Object reference and exception TypeCodes always have a RepositoryId. Structure, union, enumeration, and alias TypeCodes obtained from the Interface Repository or the ORB::create_operation_list operation also always have a RepositoryId. Otherwise, the id operation can return an empty string.
Returns:
the RepositoryId for the type.
Throws: BadKind
raised if the operation is invoked on an inappropriate TypeCode kind.
 o name
  public abstract String name() throws BadKind, SystemException
The name operation can also be invoked on object reference, structure, union, enumeration, alias, and exception TypeCodes. It returns the simple name identifying the type within its enclosing scope. Since names are local to a Repository, the name returned from a TypeCode may not match the name of the type in any particular Repository, and may even be an empty string.
Returns:
the name identifying the type.
Throws: BadKind
raised if the operation is invoked on an inappropriate TypeCode kind.
 o member_count
  public abstract int member_count() throws BadKind, SystemException
The member_count operation can be invoked on structure, union, and enumeration TypeCodes.
We extend the CORBA specification to allow this operation on exceptions as well.
Returns:
the number of members constituting the type.
Throws: BadKind
raised if the operation is invoked on an inappropriate TypeCode kind.
 o member_name
  public abstract String member_name(int index) throws BadKind, Bounds, SystemException
The member_name operation can be invoked on structure, union, and enumeration TypeCodes. It returns the simple name of the member identified by index. Since names are local to a Repository, the name returned from a TypeCode may not match the name of the member in any particular Repository, and may even be an empty string.
We extend the CORBA specification to allow this operation on exceptions as well.
Parameters:
index - index of member for which name is required.
Returns:
simple name of the member identified by the index.
Throws: Bounds
raised if the index is equal or greater than the number of members constituting the type.
Throws: BadKind
raised if the operation is invoked on an inappropriate TypeCode kind.
 o member_type
  public abstract TypeCode member_type(int index) throws BadKind, Bounds, SystemException
The member_type operation can be invoked on structure and union TypeCodes. It returns the TypeCode describing the type of the member identified by index.
We extend the CORBA specification to allow this operation on exceptions as well.
Parameters:
index - index of member for which type is required.
Returns:
TypeCode of the member identified by the index.
Throws: Bounds
raised if the index is equal or greater than the number of members constituting the type.
Throws: BadKind
raised if the operation is invoked on an inappropriate TypeCode kind.
 o member_label
  public abstract Any member_label(int index) throws BadKind, Bounds, SystemException
The member_label operation can only be invoked on union TypeCodes. Member_label returns the label of the union member identified by index. For the default member, the label is the zero octet.
Parameters:
index - index of member for which label is required.
Returns:
an Any describing the label of the member identified by the index.
Throws: Bounds
raised if the index is equal or greater than the number of members constituting the type.
Throws: BadKind
raised if the operation is invoked on non-union typecode.
 o discriminator_type
  public abstract TypeCode discriminator_type() throws BadKind, SystemException
The discriminator_type operation can only be invoked on union TypeCodes. The discriminator_type operation returns the type of all non-default member labels.
Returns:
the type of the non-default member labels.
Throws: BadKind
raised if the operation is invoked on non-union typecode.
 o default_index
  public abstract int default_index() throws BadKind, SystemException
The default_index operation can only be invoked on union TypeCodes. The default_index operation returns the index of the default member, or -1 if there is no default member.
Returns:
the index of the default member, or -1 if there is no default.
Throws: BadKind
raised if the operation is invoked on non-union typecode.
 o length
  public abstract int length() throws BadKind, SystemException
The length operation can be invoked on string, sequence, and array TypeCodes. For strings and sequences, it returns the bound, with zero indicating an unbounded string or sequence. For arrays, it returns number of elements in the array.
Returns:
the bound for strings and sequences, and the number of elements for arrays.
Throws: BadKind
raised if the operation is invoked on an inappropriate TypeCode kind.
 o content_type
  public abstract TypeCode content_type() throws BadKind, SystemException
The content_type operation can be invoked on sequence, array, and alias TypeCodes. For sequences and arrays, it returns the element type. For aliases, it returns the original type. Note that multidimensional arrays are represented by nesting TypeCodes, one per dimension.
Returns:
the element type for sequences and arrays, and the original type for aliases.
Throws: BadKind
raised if the operation is invoked on an inappropriate TypeCode kind.

All Packages  Class Hierarchy  This Package  Previous  Next  Index